<div class="left">
	<usr:itsMine target="${alterPageInstance.createdBy.id}">
		<g:link class="edit" url="[controller:'alterPage', action:'editProfile', id:alterPageInstance?.id]">${message(code: 'default.button.edit.profile')}</g:link>
		<g:link class="edit" url="[controller:'alterPage', action:'editFile', id:alterPageInstance?.id]">${message(code: 'default.button.edit.file')}</g:link>
										
		<usr:isAdmin>
			<g:if test="${fieldValue(bean:alterPageInstance, field: 'disabled') == 'false'}">
	    		<g:form controller="alterPage" action="disable">
	    			<g:hiddenField name="id" value="${alterPageInstance?.id}"/>
	    			<g:submitButton class="itemButton disable" name="disable" value="${message(code:'default.button.disable')}" />
	        	</g:form>
			</g:if>
	       	<g:else>
	        	<g:form controller="alterPage" action="enable">
	        		<g:hiddenField name="id" value="${alterPageInstance?.id}"/>
					<g:submitButton class="itemButton enable " name="enable" value="${message(code:'default.button.enable')}" />
				</g:form>                   		
			</g:else>
		</usr:isAdmin>
	</usr:itsMine>
	
	<usr:isUser>		
		<g:form controller="alterPage" action="moderationRequest">
			<g:hiddenField name="id" value="${alterPageInstance?.id}"/>
			<g:submitButton class="itemButton" name="moderationRequest" value="${message(code:'default.button.moderation.request')}" />
		</g:form>
	</usr:isUser>
	
	<g:remoteLink controller="alterPage" action="comments" params="['commentToId':alterPageInstance.id, 'commentToName':'alterPage']" update="commentWrapper" onComplete="showComment(); setEnviroment();">
		<g:message code="default.button.comment.list"/>:(${alterPageInstance.comments?.size()})
	</g:remoteLink>
</div>

<div class="right">
	<usr:itsMine target="${alterPageInstance.createdBy.id}">
		<g:form>
		 	<g:hiddenField name="id" value="${alterPageInstance?.id}"/>
			<g:hiddenField name="fromId" value="${alterPageInstance?.page?.id}"/>
			<g:actionSubmit class="delete itemButton" action="Delete" value="${message(code:'default.button.delete')}" onclick="return confirm('${message(code:'default.button.delete.confirm.message')}');" />
		</g:form>
	</usr:itsMine>
</div>